package com.itheima.thread.threadpool.demo02;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


public class ThreadPoolDemo03 {

    public static void main(String[] args) {

        ExecutorService executorService = Executors.newSingleThreadExecutor();

        for (int i = 0; i < 100; i++) {
            executorService.submit(() -> System.out.println(Thread.currentThread().getName() + "任务执行了..."));
        }

        executorService.shutdown();

    }

}
